﻿package com.codingbros.brogui {
	import flash.display.Shape;
	
	/**
	 * ...
	 * @author ...
	 */
	public class BroButtonBackground extends Shape implements IBroGUIGraphic{
		
		private var _width:int;
		private var _height:int;
		
		private var _backgroundColor:uint = 0x000000;
		private var _backgroundAlpha:Number = 0.9;
		
		private var _strokeWeight:int = 2;
		private var _strokeColor:uint = 0x000000;
		private var _strokeAlpha:Number = 1;
		
		public function BroButtonBackground() {
		}
		
		public function init(width:int, height:int):void 
		{
			_width = width;
			_height = height;
			
			graphics.lineStyle(_strokeWeight, _strokeColor, _strokeAlpha);
			graphics.beginFill(_backgroundColor, _backgroundAlpha);
			graphics.drawRect(0, 0, width, height);
			graphics.endFill();
			
			setUpState();
		}
		
		public function setUpState():void 
		{
			this.alpha = 0.9;			
		}
		
		public function setOverState():void
		{
			this.alpha = 1;
		}
		
		public function setDownState():void
		{
			this.alpha = 0.8;
		}
		
		
	}
	
}